package edu.soc.cs5226.gui.entities.util;

/**
 * return system time
 * @author Huimin
 */

public class TimeUtil {
  private long currentTime;
  private static TimeUtil instance = null;
  
  public TimeUtil(){
    currentTime = System.currentTimeMillis();
  }
  /**
   * returns singleton
   * @return TimeUtil
   */
  public static TimeUtil getInstance () {
    if (instance == null) {
      instance = new TimeUtil();
    }
    return instance;
  }
  public long getTime() {
    currentTime = System.currentTimeMillis();
    return currentTime;
  }
}
